API Manager API
Getting API from Exchange
To get an API from Exchange, you need at least the “Manage APIs Configuration” permission over the environment and permission to see the asset in Exchange. The URI contains the target environment, as for example:
curl -X POST \
"https://anypoint.mulesoft.com/apimanager/api/v1/organizations/:organizationId/environments/:environmentId/apis" \
-H "authorization: bearer OMITTED" \
-H "content-type: application/json" \
-d '{
"endpoint": {
"type": <:type>,
"uri": "http://google.com",
"proxyUri": "http://0.0.0.0:8081",
"isCloudHub": true
},
"technology": "mule4",
"instanceLabel": <:instanceLabel>,
"spec": {
"assetId": <:assetId>,
"version": <:version>,
"groupId": <:groupId>
}
}'
'
- type could be "rest-api" (for RAML/OAS), "http-api" (for HTTP) or "soap-api" (for WSDL)
- proxyUri is optional - For example, to have a proxy listen on port 8081, a common value would be
http://0.0.0.0:8081
- technology: it may be
"mule4"
,"flexGateway"
,"mule3"
or"serviceMesh"
, depending on what runtime technology will be used - isCloudHub: if it will be deployed to CloudHub or not (“true" or "false")
- instanceLabel is an optional string, but it is recommended if you have multiple managed instances of the same API